import request from '@/utils/request'

export function getCategoryListByPage(data) {
  return request.get('/category/list', { params: data })
}

export function getAllCategory(data) {
  return request.get('/categorys', data)
}

export function addCategory(data) {
  return request.post('/category', data)
}

export function updateCategory(data) {
  return request.put('/category', data)
}

export function deleteCategory(id) {
  return request.delete('/category/' + id, id)
}
